import { createBrowserRouter } from 'react-router-dom'
import Login from "../pages/Login"
import MyLayout from "../pages/MyLayout";
import Home from '../pages/Home'
import My from '../pages/My'
import Register from '../pages/Register';

const router = createBrowserRouter([
  {
    path: '/login',
    element: <Login />
  },
  {
    path: '/register',
    element: <Register />
  },
  {
    path: '/',
    element: <MyLayout />,
    children: [
      {
        index: true,
        element: <Home />
      },
      {
        path: '/my',
        element: <My />
      }
    ]
  },
])

export default router